package com.draem0507.refactor;

/**
 * @title what to do .
 * @desc
 * @atuh lwx
 * @createtime on 2015/12/9 19:45
 */
public class TempDemo {





}

    abstract class ParentBy {


    public void say(){
        if(judge()){

            System.out.println("paretn说了一句话");
        }


    }

    abstract   boolean judge();
}


class ChildBy1 extends  ParentBy{


    public void say(){
        if(judge()){

            System.out.println("paretn说了一句话");
        }


    }

       boolean judge(){

           return true;

       }

}class ChildBy extends  ParentBy{


    public void say(){
        if(judge()){

            System.out.println("paretn说了一句话");
        }


    }

       boolean judge(){

           return false;

       }

}